import request from '@/utils/request'

// 新增的函数，用于获取所有账户汇总数据
export function listAllAccountSummary() {
  return request({
    url: '/account/summary/list',
    method: 'post',
    data: {}
  })
}

export function listAccountSummary(query) {
  return request({
    url: '/account/summary/page',
    method: 'post',
    data: query,
    params: {
      pageNum: query.page,
      pageSize: query.size
    }
  })
}

export function getAccountSummary(id) {
  return request({
    url: `/account/summary/${id}`,
    method: 'get'
  })
}

export function addOrUpdateAccountSummary(data) {
  return request({
    url: '/account/summary/save',
    method: 'post',
    data: data
  })
}

export function delAccountSummary(id) {
  return request({
    url: `/account/summary/${id}`,
    method: 'delete'
  })
}